Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: Telephony /
Chapter 5 - Telephone Manager Messages / Telephone Manager Message Reference
Telephone Manager Message Functions / Registering Message Handlers


TELDNMsgHand

Registers a directory number message handler and specifies which messages it should receive.

pascal TELErr TELDNMsgHand (
                     TELDNHandle hTELDN,
                     Boolean allDNs,
                     long eventMask,
                     TelephoneDNMsgUPP msgProc,
                     long globals);
hTELDN
A handle to the directory number record for the directory number for which you want to receive messages.
allDNs
A Boolean value that indicates whether the message handler should get messages for all directory numbers associated with the same terminal as the one identified by the hTELDN parameter. Set this parameter to true to receive messages for all such directory numbers. Set this parameter to false to receive only messages for the directory number specified by the hTELDN parameter.
eventMask
A long integer that specifies which directory number messages this message handler should receive. To have your message handler receive a certain message, set a bit to 1. See "Directory Number Messages" on page 5-12 for a description of the bit masks you can use.
msgProc
A message handler (page 5-57).
globals
A long integer for your use. The Telephone Manager passes this value to your message handler. You can use this value, for example, to access your application's global variables.
function result
A result code. See "Result Codes" on page 5-60 for a list of result codes that the Telephone Manager may return.
DESCRIPTION
The TELDNMsgHand function registers the message handler specified by the msgProc parameter to respond to the directory number messages issued by the directory number specified by the hTELDN parameter. You specify which messages you want to receive by setting bits in the eventMask parameter. If you want to change a value in the message mask after you have registered a directory number message handler, you must first clear the message handler by calling the TELClrDNMsgHand function (page 5-55) and then register it again by calling TELDNMsgHand.

SEE ALSO
Use the TELTermMsgHand function (page 5-50) to register a handler for terminal messages.

Use the TELCAMsgHand function (page 5-52) to register a handler for call appearance messages.

Call the TELClrDNMsgHand function (page 5-55) to remove a directory number message handler from the Telephone Manager's calling list.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 DEC 1996



Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help